package com.bean.Dao;

import com.bean.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/*
    代理方式实现的dao
 */
public interface UserMapper {
    //查询全部
    List<User> findAll() throws Exception;

    //根据id查询
    User findById(int id) throws Exception;

    List<User> findAllResultMap() throws Exception;

    //多条件查询
    List<User> findByIdAndUsername(int id,String username);

    List<User> findIdByUsername(User user);

    List<User> findByIdAndUsername1(
            @Param("id") int id,
            @Param("username") String username);

    void saveUser(User user);
    void saveUser1(User user);
    List<User> findByUsernameAndIdIf(User user);

    void updateSet(User user);

    List<User> findByIds1(List list);
    List<User> findByIds2(Integer[] list);
}
